<%@ page import="edu.uow.devdocs.*" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'deployment.label', default: 'Deployment')}" />
		<title><g:message code="default.showCost.label" args="[deploymentInstance]" /></title>
		<style type="text/css">
		.show_deployment {
			background-image: url(<fam:icon name="table_multiple"/>);
		    background-position: 0.7em center;
		    background-repeat: no-repeat;
		    text-indent: 25px;
		}
		</style>
	</head>
	<body>
		<a href="#edit-deployment" class="skip" tabindex="-1"><g:message code="default.link.skip.label" default="Skip to content&hellip;"/></a>
		<div class="nav" role="navigation">
			<ul>
				<li><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></li>
				<li><g:link class="create" action="create"><g:message code="default.new.label" args="[entityName]" /></g:link></li>
				<li><g:link class="show_deployment" action="show" id="${deploymentInstance?.id }"><g:message code="default.show.label" args="[entityName]" /></g:link></li>
			</ul>
		</div>
		<br/>
		<table>
			<thead>
				<tr>
					<th>Issue</th>
					<th>Status</th>
					<th>Estimate</th>
					<th>Actual</th>
				</tr>
			</thead>
			<tbody>
				<g:each in="${DevelopmentTask.findAllByDeployment(deploymentInstance)*.issue.unique() }" var="issue">
					<tr>
						<td>${issue }</td>
						<td>${issue.status }</td>
						<td>${issue.estimatedHours }
						<td>${TimeTracker.findAllByIssue(issue)*.hours.sum() }</td>
					</tr>
				</g:each>
			</tbody>
		</table>
		

	</body>
</html>
